<html>

<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<meta name="viewport" content="width=device-width">
<script
	type="text/javascript" src="DEencuestador.js"
></script>
<script type="text/javascript" src="gps.js"></script>
<title>Usuario</title>
</head>

<body onload=" aceptar()">
<script type="text/javascript" src="JSLINQ.js"></script>
<script type="text/javascript" src="jLinq-2.2.1.packed.js"></script>
<script
	type="text/javascript"
	src="DEencuestador.js"
></script>

	
<script language="javascript" type="text/javascript">


function aceptar(){ 

	localStorage.setItem("idencuestador",document.form1.login.value );
	localStorage.setItem('imei',javainterface2.telefonoimei());
	var cantPersonas=0;
 
	
	letra=localStorage.getItem('letra');
	
		if (localStorage.getItem("ultimaPregunta")!=0 && localStorage.getItem("ultimaPregunta")==null && localStorage.getItem("ultimaPregunta")=='null'){
			location.href=letra+localStorage.getItem("ultimaPregunta")+'.htm';}
		else{

			location.href='menu.htm';
		}
	

}
   
	
		function limpiar(){
 			localStorage.clear();
}
	
	function Sincronizar(){

		var resultadoconcronizar= javainterface.traerjsonservisor("SELECT idencuestador as  login,password,cargo FROM tblencuestadores");
		localStorage.setItem("ListaPersonal",resultadoconcronizar);
	}
 </script>

<form name="form1">
    <table border="0" width="30%">
        <tr>
            <td colspan="2"><img src="inicio1.jpg" width="320"
            height="83"></td>
        </tr>
        <tr>
            <td width="45%" height="39"><b>Usuario</b></td>
            <td width="44%" height="39"><input type="text"
            size="20" name="login" value="666" id="login"></td>
        </tr>
        <tr>
            <td width="45%" height="34"><b>Clave</b></td>
            <td width="44%" height="34"><input type="password"
            size="20" name="password" value="123" id="password"></td>
        </tr>
        <tr>
            <td align="center" colspan="2" width="98%"
            height="30"><input type="button" name="B1"
            value="Aceptar" onclick="aceptar()"> <input
            type="button" name="B3" value="Cancelar"
            onclick="cancelar()"></td>
        </tr>
        <tr>
            <td align="right" colspan="2"><p align="left"><input
            type="button" name="Limpiar" value="Limpiar"
            onclick="limpiar()"></p>
            <p align="left"><input type="button" name="servidor"
            value="Servidor" onclick="Sincronizar()"></p>
            </td>
        </tr>
    </table>
</form>
</body>
</html>
